interface Product {
  id: number;
  image: string;
  name: string;
  price: number;
  sales: number;
  comments: number;
  isAd: boolean;
}

const generateRandomNumber = (max: number = 9999, min: number = 1): number => {
  return Math.floor(Math.random() * (max - min + 1)) + min;
};

const generateProducts = (count: number = 93): Product[] => {
  return Array.from({ length: count }, (_, index) => ({
    id: index + 1,
    image: `/products/${index + 1}.jpeg`,
    name: `商品${index + 1}`,
    price: generateRandomNumber(),
    sales: generateRandomNumber(),
    comments: generateRandomNumber(),
    isAd: false,
  }));
};

const products: Product[] = generateProducts();

export const productList = products;